<?php

namespace app\api\controller;

use app\api\library\EasyWeChats;
use app\common\controller\Api;
class Wechat extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    public function config()
    {
        $allow_url = $this->request->param('url',$this->request->domain().'/yingxiao');
        $allow_url =  html_entity_decode($allow_url, ENT_QUOTES | ENT_HTML5, 'UTF-8');;
        $data = (new EasyWeChats())->js_config($allow_url);
        // halt($data);
        $this->success('获取成功',$data);
    }
}